from flask.views import MethodView

from application import logger


class Views(MethodView):
    def get(self):
        logger.info("测试成功")
        return "get list"

    def post(self):
        return "post list"

    def put(self):
        return "put list"

    def patch(self):
        return "patch list"

    def delete(self):
        return "delete list"


class ListViewSet(MethodView):

    def get(self, id):
        return f"get {id}"

    def post(self, id):
        return f"post {id}"

    def put(self, id):
        return f"put {id}"

    def patch(self, id):
        return f"patch {id}"

    def delete(self, id):
        return f"delete {id}"
